package com.ylx.service;

import com.ylx.mapper.UserMapper;
import com.ylx.util.SqlSessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

public class AdminTsuService {
    public void addone (String tstitle, String tscontent, String tspicture) {

        SqlSessionFactory sqlSessionFactory = SqlSessionFactoryUtils.getSqlSessionFactory();

        SqlSession sqlSession = sqlSessionFactory.openSession();
        UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
        userMapper.addone(tstitle, tscontent, tspicture);
        sqlSession.commit();

    }

}